package com.zte.market.service.otherService.otherImpl;

import com.zte.market.mapper.otherMapper.CBrandMapper;
import com.zte.market.pojo.otherPojo.CBrand;
import com.zte.market.pojo.otherPojo.CType;
import com.zte.market.service.otherService.CBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 品牌
 * @Auther: 许月
 * @Date: 2022/10/06/19:30
 */
@Service
public class CBrandServiceImpl implements CBrandService {


    @Autowired
    private CBrandMapper cBrandMapper; //品牌 对应的 mapper 接口（持久层）




    /**
     * 通过品牌 id 查询品牌信息
     * @param brandId
     * @return
     */
    @Override
    public CBrand getByBrandId(Integer brandId) {
        CBrand cBrand  = cBrandMapper.queryByBrandId(brandId);
        return cBrand;
    }


    /**
     * 获取所有的品牌列表（用于订单模块的增加和修改）
     * @return
     */
    @Override
    public List<CBrand> getAll() {
        List<CBrand> cBrandList = cBrandMapper.queryAll();
        return cBrandList;
    }
}
